<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>markdown</title>
    <link rel="stylesheet" href="{{ url_for('static',filename='editormd/css/editormd.css') }}"/>
</head>
<body>
    <div id="fancy-editormd" class="editormd">
    <textarea id="body" name="body" required style="display: none"></textarea>

</div>
<button onclick="tijiao()">提交</button>
</body>

<script src="{{ url_for('static',filename='editormd/examples/js/jquery.min.js') }}"></script>
<script src="{{ url_for('static',filename='editormd/editormd.min.js') }}"></script>
<script type="text/javascript">
    $(function () {
        editormd("fancy-editormd", {
            // width: "100%", 请不要添加
            height: 640,
            syncScrolling: "single",
            path: "{{ url_for('static',filename='editormd/lib/') }}",
            saveHTMLToTextarea : true
        });
    });
    function tijiao(){
        $.ajax({
            url:"biaodan",
            method:"post",
            data:{
                text:$(".editormd-html-textarea").text(),
                val:$(".editormd-html-textarea").val(),
                html:$(".editormd-html-textarea").html(),
            },
            success:{
                {#alert( "chenggong")#}
            }

            }
        )
    }
</script>
</html>